<!--
*Author：DGZ
 **  contact:service@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demoproject/order/Demo_OrderList.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demoproject/order/Demo_OrderList.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'OrderList_Id',
                footer: "Foots",
                cnName: '订单明细',
                name: 'order/Demo_OrderList',
                newTabEdit: false,
                url: "/Demo_OrderList/",
                sortName: "CreateTime"
            });
            const editFormFields = ref({"GoodsCode":"","GoodsName":"","Specs":"","Price":"","Qty":""});
            const editFormOptions = ref([[{"dataKey":"商品规格","data":[],"title":"商品规格","field":"Specs","disabled":true,"type":"select"},
                               {"title":"商品编号","required":true,"field":"GoodsCode","disabled":true},
                               {"title":"商品名称","required":true,"field":"GoodsName","disabled":true},
                               {"title":"单价","required":true,"field":"Price","disabled":true,"type":"decimal"},
                               {"title":"数量","required":true,"field":"Qty","type":"number"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'OrderList_Id',title:'OrderList_Id',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Order_Id',title:'Order_Id',type:'string',width:110,hidden:true,align:'left'},
                       {field:'GoodsId',title:'商品id',type:'string',width:110,hidden:true,align:'left'},
                       {field:'GoodsCode',title:'商品编号',type:'string',width:120,readonly:true,require:true,align:'left'},
                       {field:'GoodsName',title:'商品名称',type:'string',width:120,readonly:true,require:true,align:'left'},
                       {field:'Img',title:'商品图片',type:'img',width:100,align:'left'},
                       {field:'Specs',title:'商品规格',type:'string',bind:{ key:'商品规格',data:[]},width:120,readonly:true,align:'left'},
                       {field:'Price',title:'单价',type:'decimal',width:110,readonly:true,require:true,align:'left'},
                       {field:'Qty',title:'数量',type:'int',width:110,require:true,align:'left'},
                       {field:'Remarks',title:'备注',type:'string',width:120,align:'left'},
                       {field:'CreateId',title:'创建人编号',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',width:145,align:'left'},
                       {field:'ModifyId',title:'修改人编号',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'Modifier',type:'string',width:130,hidden:true,align:'left'},
                       {field:'ModifyTime',title:'ModifyTime',type:'datetime',width:110,hidden:true,align:'left'},
                       {field:'IsValid',title:'逻辑删除',type:'int',width:120,hidden:true,require:true,align:'left'}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
